package com.kashow.bean.live.category;

import android.text.TextUtils;

import com.kashow.C;
import com.kashow.bean.BaseBean;

import java.util.List;

/**
 * Created by yybs on 16/11/5.
 */

public class CategoryLive extends BaseBean {
    /**
     * _id : 44
     * a_stream : []
     * a_watch : 93
     * category : {"_id":5,"name":"社会百态-子分类1"}
     * createdAt : 2016-11-18T03:43:45.748Z
     * desc : 培训行业趋势论坛vr直播
     * livePic : http://oss.kashowvr.com/wx/upload/media/x3sZnSrLE6p_TxD792ZMvUxSIyVkaa5OU3sPmh7AKxPjVZKdRUvr03ETdy26by8f.jpeg
     * liveSharePic : http://oss.kashowvr.com/wx/upload/media/x3sZnSrLE6p_TxD792ZMvUxSIyVkaa5OU3sPmh7AKxPjVZKdRUvr03ETdy26by8f.jpeg
     * playUrl : http://pili-live-hls.kashowvr.com/kashowvr/27730c7d7e2347bd9a2ded8d687dd2ac.m3u8
     * priority : 1
     * score : 0.02
     * startAt : 2016-11-28T00:00:00.000Z
     * status : 2
     * stream : 27730c7d7e2347bd9a2ded8d687dd2ac
     * teacher : {"__v":0,"_id":4,"balance":0,"createdAt":"2016-10-24T05:47:12.714Z","isSub":true,"isTeacher":true,"level":1,"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","phone":"15121013068","relation":2,"score":0,"sex":0,"wxUserInfo":{"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","nickname":"逆风飞行","sex":1,"city":"east","province":"Tianjin","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0","updatedAt":"2016-10-24T05:47:12.000Z"}}
     * title : 趋势论坛vr直播
     * watch : 93
     * id : 44
     */

    private int _id;
    private int a_watch;
    //private int category;
    private String createdAt;
    private String desc;
    private String livePic;
    private String liveSharePic;
    private String playUrl;
    private int priority;
    private double score;
    private String startAt;
    private int status;
    private String stream;
    private TeacherBean teacher;
    private String title;
    private int watch;
    private String id;
    private int liveType;
    private List<String> a_stream;

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public int getA_watch() {
        return a_watch;
    }

    public void setA_watch(int a_watch) {
        this.a_watch = a_watch;
    }

//    public int getCategory() {
//        return category;
//    }

//    public void setCategory(int category) {
//        this.category = category;
//    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getLivePic() {
        return livePic;
    }

    public void setLivePic(String livePic) {
        this.livePic = livePic;
    }

    public String getLiveSharePic() {
        return liveSharePic;
    }

    public void setLiveSharePic(String liveSharePic) {
        this.liveSharePic = liveSharePic;
    }

    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getStartAt() {
        return startAt;
    }

    public void setStartAt(String startAt) {
        this.startAt = startAt;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStream() {
        return stream;
    }

    public void setStream(String stream) {
        this.stream = stream;
    }

    public TeacherBean getTeacher() {
        return teacher;
    }

    public void setTeacher(TeacherBean teacher) {
        this.teacher = teacher;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getWatch() {
        return watch;
    }

    public void setWatch(int watch) {
        this.watch = watch;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List<String> getA_stream() {
        return a_stream;
    }

    public void setA_stream(List<String> a_stream) {
        this.a_stream = a_stream;
    }

    public int getLiveType() {
        return liveType;
    }

    public void setLiveType(int liveType) {
        this.liveType = liveType;
    }

    public static class CategoryBean {
        /**
         * _id : 5
         * name : 社会百态-子分类1
         */

        private int _id;
        private String name;

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static class TeacherBean {
        /**
         * __v : 0
         * _id : 4
         * balance : 0
         * createdAt : 2016-10-24T05:47:12.714Z
         * isSub : true
         * isTeacher : true
         * level : 1
         * openid : ohHipvzbJn7nBhTdLFJv80PQV5N0
         * phone : 15121013068
         * relation : 2
         * score : 0
         * sex : 0
         * wxUserInfo : {"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","nickname":"逆风飞行","sex":1,"city":"east","province":"Tianjin","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0","updatedAt":"2016-10-24T05:47:12.000Z"}
         */

        private int _id;
        private int balance;
        private String createdAt;
        private boolean isSub;
        private boolean isTeacher;
        private int level;
        private String openid;
        private String phone;
        private int relation;
        private float score;
        private String nickname;
        private String headimgurl;
        private int sex;
        private WxUserInfoBean wxUserInfo;

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }

        public int getBalance() {
            return balance;
        }

        public void setBalance(int balance) {
            this.balance = balance;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public boolean isIsSub() {
            return isSub;
        }

        public void setIsSub(boolean isSub) {
            this.isSub = isSub;
        }

        public boolean isIsTeacher() {
            return isTeacher;
        }

        public void setIsTeacher(boolean isTeacher) {
            this.isTeacher = isTeacher;
        }

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }

        public String getOpenid() {
            return openid;
        }

        public void setOpenid(String openid) {
            this.openid = openid;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public int getRelation() {
            return relation;
        }

        public void setRelation(int relation) {
            this.relation = relation;
        }

        public float getScore() {
            return score;
        }

        public void setScore(float score) {
            this.score = score;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public WxUserInfoBean getWxUserInfo() {
            return wxUserInfo;
        }

        public void setWxUserInfo(WxUserInfoBean wxUserInfo) {
            this.wxUserInfo = wxUserInfo;
        }

        public String getHeadimgurl() {
            if (TextUtils.isEmpty(headimgurl)) {
                if (wxUserInfo != null) {
                    headimgurl =  wxUserInfo.getHeadimgurl();
                }
            }
            if (TextUtils.isEmpty(headimgurl)) {
                headimgurl =  "";
            }
            return headimgurl;
        }

        public void setHeadimgurl(String headimgurl) {
            this.headimgurl = headimgurl;
        }

        public String getNickname() {
            if (TextUtils.isEmpty(nickname)) {
                if (wxUserInfo != null) {
                    nickname =  wxUserInfo.getNickname();
                }
            }
            if (TextUtils.isEmpty(nickname)) {
                nickname =  C.DEFAULT_TEACHER_NAME;
            }
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }


        public static class WxUserInfoBean {
            /**
             * openid : ohHipvzbJn7nBhTdLFJv80PQV5N0
             * nickname : 逆风飞行
             * sex : 1
             * city : east
             * province : Tianjin
             * country : China
             * headimgurl : http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0
             * updatedAt : 2016-10-24T05:47:12.000Z
             */

            private String openid;
            private String nickname;
            private int sex;
            private String city;
            private String province;
            private String country;
            private String headimgurl;
            private String updatedAt;

            public String getOpenid() {
                return openid;
            }

            public void setOpenid(String openid) {
                this.openid = openid;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public int getSex() {
                return sex;
            }

            public void setSex(int sex) {
                this.sex = sex;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public String getCountry() {
                return country;
            }

            public void setCountry(String country) {
                this.country = country;
            }

            public String getHeadimgurl() {
                return headimgurl;
            }

            public void setHeadimgurl(String headimgurl) {
                this.headimgurl = headimgurl;
            }

            public String getUpdatedAt() {
                return updatedAt;
            }

            public void setUpdatedAt(String updatedAt) {
                this.updatedAt = updatedAt;
            }
        }
    }
}
